class CreateRoles < ActiveRecord::Migration
  def self.up
    create_table :roles do |t|
      t.column :code, :string
      t.column :description, :string
      t.column :display_order, :integer
      t.column :active, :boolean, :default => false      
      t.column :created_at, :string
      t.column :updated_at, :string
    end
    
    Role.create(:code => 'ADMIN', :description => 'System Administrator')
    Role.create(:code => 'OWNER', :description => 'System Owner')
    Role.create(:code => 'STAFF', :description => 'Staff')
    Role.create(:code => 'PARNT', :description => 'Parent')
  end

  def self.down
    drop_table :roles
  end
end
